package at.fhooe.ems.dal;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class SensorDataModel {

	private Date sensorTime;
	private double temperature;
	private double humidity;
	private boolean smoke;
	private double lightness;
	private double noise;
	private int smokeConstant;
	public String sqlDateTime;
	private List<String> activeSensors = null;
	

	public String getSensorDateTime() {
	 SimpleDateFormat sdf = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     sqlDateTime= sdf.format(sensorTime);
	 
     return sqlDateTime;
	}


	public int getSmokeConstant() {
		if(smoke){
			smokeConstant=1;
		}
		else{
			smokeConstant=0;
		}
		return smokeConstant;
	}
	
	public void setSmokeConstant(int smokeConstant) {
		this.smokeConstant = smokeConstant;
	}
	public Date getSensorTime() {
		return sensorTime;
	}
	public void setSensorTime(Date sensorTime) {
		this.sensorTime = sensorTime;
	}
	public double getTemperature() {
		return temperature;
	}
	public void setTemperature(double temperature) {
		this.temperature = temperature;
	}
	public double getHumidity() {
		return humidity;
	}
	public void setHumidity(double humidity) {
		this.humidity = humidity;
	}
	public boolean isSmoke() {
		return smoke;
	}
	public void setSmoke(boolean smoke) {
		this.smoke = smoke;
	}
	public double getLightness() {
		return lightness;
	}
	public void setLightness(double lightness) {
		this.lightness = lightness;
	}
	public double getNoise() {
		return noise;
	}
	public void setNoise(double noise) {
		this.noise = noise;
	}

	public List<String> getActiveSensors() {
		return activeSensors;
	}

	public void setActiveSensors(List<String> activeSensors) {
		this.activeSensors = activeSensors;
	}
	
	

}
